package com.cv.infra.controller.platform.file;

import com.cv.framework.common.pojo.Result;
import com.cv.infra.controller.platform.file.vo.PlatformFileRespVO;
import com.cv.infra.service.file.FileService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 视频平台 - 平台文件控制层
 *
 * @author Charles_XDXD
 */
@Tag(name = "视频平台 - 平台文件控制层")
@RestController
@RequestMapping("/infra/file")
public class PlatformFileController {

    @Resource
    private FileService fileService;

    @GetMapping("checkExist")
    public Result<PlatformFileRespVO> checkExist(String hash) {
        return Result.success(fileService.checkFileExist(hash));
    }

}
